<?php
	include("../lib/DataProvider.php");
?>
<table width="100%" cellspacing="10">
	<tr >
		<td class="nsx">
			<table width="100%" cellspacing="0">
				<tr class="dong2">
					<td colspan="6"><input type="button" onclick="ThemNSX()" value="Thêm nhà sản xuất" class="btnThem"/></td>
				</tr>
				<tr class="dong1">
					<td class="khung" width="15%">Mã NSX</td>
					<td class="khung" width="27%">Tên NSX</td>
					<td class="khung" width="26%">Địa chỉ</td>
					<td class="khung" width="12%">Bị xoá</td>
					<td class="khung" width="10%">Sửa</td>
					<td width="10%">Xoá</td>
				</tr>
				<?php
					$dsHSX=DataProvider::ExecuteQuery("select * from hangsanxuat");
					$mau=0;
					while($row = mysql_fetch_array($dsHSX,MYSQL_ASSOC))
					{
						$MaNSX=$row['MAHSX'];
						$TenNSX=$row['TENHSX'];
						$DiaChi=$row['DIACHI'];
						$BiXoa=$row['BIXOA'];
						?>
						<tr class="<?php if($mau%2 ==0) echo "nhat"; else echo "dam";?>">
							<td class="khung" align="center" ><?php echo $MaNSX;?></td>
							<td class="khung"><?php echo $TenNSX;?></td>
							<td class="khung"><?php echo $DiaChi;?></td>
							<td class="khung" align="center"><?php echo $BiXoa;?></td>
							<td class="khung" align="center"><a href="?act=7&sk=2&ID=<?php echo $MaNSX;?>"><img src="img/edit.png" width="25" /></a></td>
			<td class="cangiua"><a href="?act=7&sk=3&ID=<?php echo $MaNSX;?>"><img src="img/del.png" width="25"/></a></td>
						</tr>						
						<?php
						$mau++;
					}
				?>
		  </table>
		</td>
		<td class="line">
		</td>
		<td class="lsp">
			<table width="100%" cellspacing="0">
				<tr class="dong2">
					<td colspan="6"><input type="button" onclick="ThemLSP()" value="Thêm loại sản phẩm" class="btnThem"/></td>
				</tr>
				<tr class="dong1">
					<td class="khung">Mã LSP</td>
					<td class="khung">Tên LSP</td>
					<td class="khung">Mã NSX</td>
					<td class="khung">Bị xoá</td>
					<td class="khung">Sửa</td>
					<td>Xoá</td>
				</tr>
				<?php
					$dsLSP=DataProvider::ExecuteQuery("select * from loaisanpham");
					$mau=0;
					while($row = mysql_fetch_array($dsLSP,MYSQL_ASSOC))
					{
						$MaLSP=$row['MALSP'];
						$TenLSP=$row['TENLSP'];
						$MaNSX=$row['MAHSX'];
						$BiXoa=$row['BIXOA'];
						?>
						<tr class="<?php if($mau%2 ==0) echo "nhat"; else echo "dam";?>">
							<td class="khung"><?php echo $MaLSP;?></td>
							<td class="khung"><?php echo $TenLSP;?></td>
							<td class="khung" align="center"><?php echo $MaNSX;?></td>
							<td class="khung" align="center"><?php echo $BiXoa;?></td>
							<td class="khung" align="center"><a href="?act=7&sk=5&ID=<?php echo $MaLSP;?>"><img src="img/edit.png" width="25" /></a></td>
			<td class="cangiua"><a href="?act=7&sk=6&ID=<?php echo $MaLSP;?>"><img src="img/del.png" width="25"/></a></td>
						</tr>						
						<?php
						$mau++;
					}
				?>
			</table>
		</td>
		
	</tr>
<?php
	

?>